#  minimum required cmake version: 3.1.0
cmake_minimum_required(VERSION 3.1.0)

project(realsense_test)

find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)

find_library(REALSENSE2_FOUND realsense2 HINTS ${LIBRARY_DIR} REQUIRED)
if(NOT REALSENSE2_FOUND)
    SET(REALSENSE2_FOUND "realsense2")
    message(WARN "Failed to find_library(realsense2)")
endif()

include_directories(
    include
    ${OPENCV_INCLUDE_DIRS}
    ${PCL_INCLUDE_DIRS}
)

link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable(align_to_color src/align_to_color.cpp)
target_link_libraries(align_to_color ${REALSENSE2_FOUND} ${OpenCV_LIBS})


add_executable(pointcloud_test src/get_pointcloud.cpp)
target_link_libraries(pointcloud_test ${REALSENSE2_FOUND} ${OpenCV_LIBS} ${PCL_LIBRARIES})
